﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='line_insert' and s.name='Budget')
DROP PROCEDURE [Budget].line_insert
GO
CREATE PROCEDURE [Budget].line_insert 
@PK uniqueidentifier, 
@BudgetID uniqueidentifier, 
@CategoryID uniqueidentifier, 
@ParentID uniqueidentifier, 
@Code nvarchar(50), 
@Name nvarchar(200), 
@Amount decimal(10, 2), 
@Description nvarchar(200)
AS
BEGIN
INSERT INTO [Budget].[Lines]
([id_line], [id_budget], [id_category], [id_parent], [code], [name], [amount], [description])
VALUES (@PK,@BudgetID,@CategoryID,@ParentID,@Code,@Name,@Amount,@Description)
END